package com.qst.biz.impl;

import com.qst.biz.UserBiz;
import com.qst.dao.UserDao;
import com.qst.dao.impl.UserMySqlDaoImpl;
import com.qst.entity.User;

import java.util.List;

public class UserBizImpl  implements UserBiz {
    private UserDao userDao=new UserMySqlDaoImpl();
    @Override
    public List<User> getAll() {
        return userDao.getAll();
    }

    /**
     * 登录方法
     *
     * @param user
     * @return
     */
    @Override
    public User login(User user) {
        return userDao.getUserByNameAndPwd(user.getUserName(),user.getUserPwd());
    }
}
